package com.gg.controller;

import java.util.Date;

public class BuildEvent {

	private String userId;
	private long time;

	public BuildEvent(String key) {
		String[] keys = key.split(":");
		this.userId = keys[0];
		this.time = Long.parseLong(keys[1]);
	}

	public boolean hasCompleted() {
		long now = new Date().getTime();
		long interval = now - this.time;
		return (interval / 1000) > 10; 
			
	}

	public String getUserId() {
		return userId;
	}
	
}
